import React, { useState } from 'react'
import Container from '@/appComponents/Container'
import EmergentMeausere from '@/views/EmergentMeausere'
import PlanStart from '@/views/PlanStart'
import { Button } from 'antd'

import './index.scss'

const NewPlanLaunch = () => {
  // listParam {plan_id: true / false, control_type} | false(关闭)
  const [listParam, setListParam] = useState(false)
  
  return (
    <div className="NewPlanLaunch">
      <Container>
        <Container.ContainerContent>
          <PlanStart setListParam={setListParam} />
          { listParam && 
            <div className='emergent-meausere-list'>
              <Button onClick={() => {setListParam(false)}}>返回</Button>
              <EmergentMeausere listParam={listParam} />
            </div> }
        </Container.ContainerContent>
      </Container>
    </div>
  )
}

export default NewPlanLaunch
